package com.liiy.missyou.factory;

import com.liiy.missyou.factory.hero.Camilla;
import com.liiy.missyou.factory.hero.Diana;
import com.liiy.missyou.factory.hero.Irelia;

public class HeroFactory {
    public static ISkill getHero(String name) throws Exception {
        ISkill iSkill;
        switch (name) {
            case "diana":
                iSkill= new Diana();
                break;
            case "irelia":
                iSkill = new Irelia();
                break;
            case "camilla":
                iSkill = new Camilla();
                break;
            default:
                throw new Exception();
        }
        return iSkill;
    }
}
